package com.yanqu.road.entity.scenecard;

import java.util.ArrayList;

/**
 * 游戏场景卡片配置
 */
public enum SceneCardConfig {

    /**
     * 月卡奖励推送
     */
    MonthCard(100, "9238", "月卡"),
    /**
     * 年卡奖励推送
     */
    YearCard(100, "9239", "年卡"),
    /**
     * 七日签到
     */
    SevenSign(100, "9249", "七日签到"),
    ;

    private String cardId;

    private ArrayList<Integer> aid = new ArrayList<>();  // 1为抖音 2为抖音极速版 100为两者都要

    /**
     * 游戏内的 标题
     */
    private String gameTitle;

    SceneCardConfig(int aid, String cardId, String gameTitle) {
        if (aid == 100) {
            this.aid.add(1);
            this.aid.add(2);
        } else {
            this.aid.add(aid);
        }
        this.cardId = cardId;
        this.gameTitle = gameTitle;
    }

    public static SceneCardConfig forNumber(String cardId) {
        for (SceneCardConfig item : SceneCardConfig.values()) {
            if (item.cardId.equals(cardId)) {
                return item;
            }
        }
        return null;
    }

    public ArrayList<Integer> getAid() {
        return aid;
    }

    public int getCardId() {
        return Integer.parseInt(cardId);
    }

    public void setCardId(String cardId) {
        this.cardId = cardId;
    }

    public String getGameTitle() {
        return gameTitle;
    }

    public void setGameTitle(String gameTitle) {
        this.gameTitle = gameTitle;
    }
}
